<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>尺寸</title>
	<script type="text/javascript" src="js/jquery-1.12.4.min.js"></script>
	<script type="text/javascript">
		$(function () {
			var pos = $('div').eq(2).offset();
			console.log(pos);
			var w = $('.pop').outerWidth();
			var h = $('.pop').outerHeight();
			console.log(w);
			console.log(h);
			$('.pop').css({left:pos.left+w,top:pos.top});

			$('.pos').mouseover(function() {
				$('.pop').show();
			});
			$('.pos').mouseout(function() {
				$('.pop').hide();
			});
		})
	</script>
	<style type="text/css">
		.box{
			width: 100px;
			height: 100px;
			background-color: gold;
			margin-bottom: 10px;
		}
		.pos{
			margin-left: 500px; 
		}

		.pop{
			width: 100px;
			height: 100px;
			background-color: red;
			position: fixed;
			left: 0;
			top: 0;
			display: none;
		}

	</style>
</head>
<body>
	<div class="box"></div>
	<div class="box"></div>
	<div class="box pos"></div>
	<div class="box"></div>

	<div class="pop">体力</div>
</body>
</html>